<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>注册页面</title>
    <script type="text/javascript" src="../script/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="../script/register.js"></script>
    <script type="text/javascript" src="../script/commonFunction.js"></script>
    <link rel="stylesheet" href="../css/registerLogin.css"/>
    <style type="text/css">
        fieldset {
            height: 260px;
            width: 360px;
            margin-top: 7%;
        }

        #psw1 {
            width: 200px;
        }

        .error {
            margin: 0 auto 5px 122px;
        }
        #ld{
            color: rgba(0,0,0,0.7);
            position: relative;
            top: 43px;
            left: -139px;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $("input").focus(function () {
                $("#error1").html("");
            })
        })
    </script>
</head>

<body id="registerBody">

<fieldset>
    <div id="error1">
        <c:if test="${error != null}">
            ${error}
        </c:if>
    </div>

    <legend align="center">用户注册</legend>
    <form action="../user/register.action" method="post" onsubmit="return checkForm()">
        <div>
            用　户　名：<input type="text" name="phone" id="name" placeholder="请输入11位数字手机号码">
        </div>
        <div class="error" id="name_error"></div>

        <div>
            密　　　码：<input type="password" name="password" placeholder="请输入密码" id="psw">
        </div>
        <div class="error" id="psw_error"></div>

        <div>
            请确认密码：<input type="password" placeholder="请确认密码" id="psw1">
        </div>
        <div class="error" id="psw1_error"></div>

        <div style="margin-top: 30px">
            <input type="submit" value="注册" id="submit1" class="sub"/>
            <input type="reset" value="取消" class="sub">
        </div>
    </form>

    <div id="ld">我要 <a href="login.jsp">登录</a> </div>
</fieldset>

</body>

</html>
